From: psm42
Date: Wed, May 20, 2009 at 7:03 AM
Subject: [RiCal] Another small problem
To: RiCal rical_gem@googlegroups.com
Hi Rick and others,
Thanks for the last fix to the Date property value. I've
found
another problem with it that you may want to look at. With
the same
(slightly broken) icalendar file I used before, I've tried
this:
cal = RiCal.parse_string(Net::HTTP.get(URI.parse('http://icalx.com/
public/rohanl/Australian32Holidays.ics')))
cal[0].events.each do |e|
puts e.occurrences(:count => 10).length
end
to exercise RiCal, and get this stack trace:
NoMethodError: undefined method to_datetime' for
#<DateTime:<br/> 4908481/2,0,2299161><br/>
from
/Users/paulsm/Projects/ri_cal/lib/ri_cal/property_value/date.rb:<br/>
141:insend'
from
/Users/paulsm/Projects/ri_cal/lib/ri_cal/property_value/date.rb:
141:in method_missing'<br/>
from
/Users/paulsm/Projects/ri_cal/lib/ri_cal/property_value/<br/>
date_time.rb:175:in<=>'
from
/Users/paulsm/Projects/ri_cal/lib/ri_cal/property_value/
recurrence_rule/enumeration_support_methods.rb:56:in
>'<br/> from
/Users/paulsm/Projects/ri_cal/lib/ri_cal/property_value/<br/>
recurrence_rule/enumeration_support_methods.rb:56:inexhausted?'
from
/Users/paulsm/Projects/ri_cal/lib/ri_cal/property_value/
recurrence_rule/enumerator.rb:72:in
next_occurrence'<br/> from
/Users/paulsm/Projects/ri_cal/lib/ri_cal/<br/>
occurrence_enumerator.rb:112:ineach'
from
/Users/paulsm/Projects/ri_cal/lib/ri_cal/
occurrence_enumerator.rb:135:in to_a'<br/>
from
/Users/paulsm/Projects/ri_cal/lib/ri_cal/<br/>
occurrence_enumerator.rb:135:into_a'
from
/Users/paulsm/Projects/ri_cal/lib/ri_cal/
occurrence_enumerator.rb:154:in occurrences'<br/>
from (irb):9<br/>
from (irb):8:ineach'
from (irb):8
from :0
It looks like a similar sort of problem.
--Paul